package org.sdp.pearproject.dto.convert;

import org.sdp.pearproject.dao.domain.*;
import org.sdp.pearproject.dto.request.*;
import java.util.Date;

/**
 * @ClassName: ProjectMemberAddRequestConvert
 * @Description:
 * @Author: SDP
 * @Date: 2022-07-12
 * @Version: 1.0
 * Table: pear_project_member
 * Comment:
 * 项目-成员表
 */
public class ProjectMemberAddRequestConvert extends BaseConvert {
    public static ProjectMemberWithBLOBs convert(ProjectMemberAddRequest request) throws Exception {
        ProjectMemberWithBLOBs daoRequest = new ProjectMemberWithBLOBs();
        copyProperties(request, daoRequest);

        daoRequest.setProjectCode(daoRequest.getProjectCode() == null ? null : daoRequest.getProjectCode().trim());
        daoRequest.setMemberCode(daoRequest.getMemberCode() == null ? null : daoRequest.getMemberCode().trim());
        daoRequest.setJoinTime(daoRequest.getJoinTime() == null ? null : daoRequest.getJoinTime().trim());
        daoRequest.setAuthorize(daoRequest.getAuthorize() == null ? null : daoRequest.getAuthorize().trim());

        return daoRequest;
    }
}
